<template>
  <div>
    <h4 class="text-center">全体组织者</h4>
    <table class="table">
      <thead>
        <tr>
          <th>活动名称</th>
          <th>活动类型</th>
          <th>活动组织者名称</th>
          <th>活动创建时间</th>
          <th>活动结束时间</th>
          <th>活动是否结束</th>
          <th>省</th>
          <th>市</th>
          <th>县</th>
          <th>详细地址</th>      
          <th>志愿者</th>    
        </tr>
      </thead>
      <tbody>
        <tr v-for="(item,index) in AllActivity" :key="index" class="table-success">
          <td>{{ item.activityName }}</td>
          <td>{{ item.activityTypeModel.activityTypeName }}</td>
          <td>{{ item.organizationModel.organizationName }}</td>
          <td>{{ item.activityCreateTime }}</td>
          <td>{{ item.activityCompleteTime }}</td>
          <td>{{ item.activityComplete?"结束":"未完成" }}</td>          
          <td>{{ item.province }}</td>
          <td>{{ item.city }}</td>
          <td>{{ item.area }}</td>
          <td class="limited-width">{{ item.detailedAddress }}</td>
          <td>
            <router-link :to="'AllActivity/Voluntary/'+item.activityID">查看参加志愿者</router-link>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
export default {
  name: 'MyOrganizationVoluntary',
  data() {
    return {
      AllActivity: null
    }
  },
  methods: {
  },
  created() {    
    this.axios.get(`/SelectIdentity/Manager/GetAllActivity`).then(res => {
      if (res.data != null) {
        this.AllActivity = res.data
      }
    })
  }
}
</script>

<style  scoped>
.limited-width {  
  max-width: 50px; /* 根据你的需要设置宽度 */  
  white-space: nowrap;  
  overflow: hidden;  
  text-overflow: ellipsis;  
}  
</style>